import datetime

from pysqlite2 import dbapi2 as sqlite3

conn = sqlite3.connect('c:\\tmp\\example')

# Crea un cursore che segue la connessione
cur = conn.cursor()
#cur.execute('insert into card (question, answer) values(?,?)', ('miao','ciao'))
#cur.execute('insert into card (question, answer) values(?,?)', ('miao2','ciao2'))
conn.commit()
v_sysdate = datetime.date.today().isoformat()
cur.execute("""select * from card where next_date = '2008-10-22'""")
for (id, question, answer, next_date, iteration) in cur:
    print 'id = %d text= %s next_date=%s' % (id, question, next_date)
    
cur.close()
conn.close()